Optimal. Leaf size=91 \[ \frac{2 c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}-\frac{\sqrt{2} (c-d) \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.109533, antiderivative size = 91, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {3920, 3774, 203, 3795} \[ \frac{2 c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}-\frac{\sqrt{2} (c-d) \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3920
Rule 3774
Rule 203
Rule 3795
Rubi steps
\begin{align*} \int \frac{c+d \sec (e+f x)}{\sqrt{a+a \sec (e+f x)}} \, dx &=\frac{c \int \sqrt{a+a \sec (e+f x)} \, dx}{a}-(c-d) \int \frac{\sec (e+f x)}{\sqrt{a+a \sec (e+f x)}} \, dx\\ &=-\frac{(2 c) \operatorname{Subst}\left (\int \frac{1}{a+x^2} \, dx,x,-\frac{a \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}+\frac{(2 (c-d)) \operatorname{Subst}\left (\int \frac{1}{2 a+x^2} \, dx,x,-\frac{a \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=\frac{2 c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} f}-\frac{\sqrt{2} (c-d) \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} f}\\ \end{align*}
Mathematica [A] time = 0.28695, size = 92, normalized size = 1.01 \[ \frac{2 \cos \left (\frac{1}{2} (e+f x)\right ) \left ((d-c) \tan ^{-1}\left (\frac{\sin \left (\frac{1}{2} (e+f x)\right )}{\sqrt{\cos (e+f x)}}\right )+\sqrt{2} c \sin ^{-1}\left (\sqrt{2} \sin \left (\frac{1}{2} (e+f x)\right )\right )\right )}{f \sqrt{\cos (e+f x)} \sqrt{a (\sec (e+f x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.217, size = 194, normalized size = 2.1 \begin{align*} -{\frac{1}{af}\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}}\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}} \left ( c\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) +c\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) +\cos \left ( fx+e \right ) -1 \right ) } \right ) -d\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) +\cos \left ( fx+e \right ) -1 \right ) } \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 5.14631, size = 824, normalized size = 9.05 \begin{align*} \left [-\frac{\sqrt{2}{\left (a c - a d\right )} \sqrt{-\frac{1}{a}} \log \left (-\frac{2 \, \sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{-\frac{1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 3 \, \cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 2 \, \sqrt{-a} c \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{2 \, a f}, -\frac{2 \, \sqrt{a} c \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) - \frac{\sqrt{2}{\left (a c - a d\right )} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right )}{\sqrt{a}}}{a f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{c + d \sec{\left (e + f x \right )}}{\sqrt{a \left (\sec{\left (e + f x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]